1200
Is it possible to display the task bars with a gradient color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/31/2009"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:Bars():CallMethod("Copy","Task","TaskO")
			oBar := oChart:Bars:Item("Task")
				oBar:Pattern := 99/*exPatternGradientVBox+exPatternBox+exPatternShadow*/
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
				oBar:SetProperty("EndColor",oBar:Color())
		oG2antt:Columns():Add("Types")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Original"),"TaskO","01/04/2010","01/09/2010","")
			oItems:AddBar(oItems:AddItem("Pattern Gradient"),"Task","01/04/2010","01/09/2010","")
			oItems:AddBar(oItems:AddItem("Original"),"TaskO","01/04/2010","01/09/2010","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1199
How can I know the type of bars I can displays using predefined patterns

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1,oBar2,oBar3,oBar4,oBar5,oBar6,oBar7,oBar8,oBar9
	LOCAL oBars
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/31/2009"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,96)
			oBars := oChart:Bars()
				oBars:Add("Box"):Pattern := 32/*exPatternBox*/
				oBars:Add("ThickBox"):Pattern := 4128/*exPatternThickBox+exPatternBox*/
				oBars:Add("DiagBox"):Pattern := 4102/*exPatternThickBox+exPatternBDiagonal*/
				oBars:CallMethod("Copy","Task","Shadow"):Pattern := 8195/*exPatternFrameShadow+exPatternShadow*/
				oBars:CallMethod("Copy","Task","TShadow"):Pattern := 12295/*exPatternFrameShadow+exPatternThickBox+exPatternDiagCross*/
				oBar := oBars:Add("HGrad1")
					oBar:Pattern := 32/*exPatternBox*/
					oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
					oBar:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
				oBar1 := oBars:Add("HGrad2")
					oBar1:Pattern := 35/*exPatternBox+exPatternShadow*/
					oBar1:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
					oBar1:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
					oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
				oBar2 := oBars:Add("HGrad3")
					oBar2:Pattern := 163/*exPatternGradient3Colors+exPatternBox+exPatternShadow*/
					oBar2:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
					oBar2:SetProperty("EndColor",oBar2:StartColor())
					oBar2:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
				oBar3 := oBars:Add("HGrad4")
					oBar3:Pattern := 4256/*exPatternThickBox+exPatternGradient3Colors+exPatternBox*/
					oBar3:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
					oBar3:SetProperty("EndColor",oBar3:StartColor())
					oBar3:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
				oBar4 := oBars:Add("HGrad5")
					oBar4:Pattern := 8352/*exPatternFrameShadow+exPatternGradient3Colors+exPatternBox*/
					oBar4:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
					oBar4:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
					oBar4:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
				oBar5 := oBars:Add("VGrad1")
					oBar5:Pattern := 96/*exPatternGradientVBox+exPatternBox*/
					oBar5:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
					oBar5:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
					oBar5:Height := 14
				oBar6 := oBars:Add("VGrad2")
					oBar6:Pattern := 99/*exPatternGradientVBox+exPatternBox+exPatternShadow*/
					oBar6:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
					oBar6:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
					oBar6:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
					oBar6:Height := 14
				oBar7 := oBars:Add("VGrad3")
					oBar7:Pattern := 227/*exPatternGradient3Colors+exPatternGradientVBox+exPatternBox+exPatternShadow*/
					oBar7:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
					oBar7:SetProperty("EndColor",oBar7:StartColor())
					oBar7:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
					oBar7:Height := 14
				oBar8 := oBars:Add("VGrad4")
					oBar8:Pattern := 4320/*exPatternThickBox+exPatternGradient3Colors+exPatternGradientVBox+exPatternBox*/
					oBar8:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
					oBar8:SetProperty("EndColor",oBar8:StartColor())
					oBar8:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
					oBar8:Height := -1
				oBar9 := oBars:Add("VGrad5")
					oBar9:Pattern := 8416/*exPatternFrameShadow+exPatternGradient3Colors+exPatternGradientVBox+exPatternBox*/
					oBar9:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
					oBar9:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
					oBar9:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
					oBar9:Height := 14
		oG2antt:Columns():Add("Types")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Box"),"Box","01/04/2010","01/09/2010","")
			oItems:AddBar(oItems:AddItem("Thick Box"),"ThickBox","01/04/2010","01/09/2010","")
			oItems:AddBar(oItems:AddItem("Thick Box Diag"),"DiagBox","01/04/2010","01/09/2010","")
			oItems:AddBar(oItems:AddItem("Shadow"),"Shadow","01/04/2010","01/09/2010","")
			oItems:AddBar(oItems:AddItem("Thick Shadow"),"TShadow","01/04/2010","01/09/2010","")
			oItems:AddBar(oItems:AddItem("Solid Gradient"),"HGrad1","01/04/2010","01/09/2010","")
			oItems:AddBar(oItems:AddItem("Pattern Gradient"),"HGrad2","01/04/2010","01/09/2010","")
			oItems:AddBar(oItems:AddItem("Pattern Gradient 3 Colors"),"HGrad3","01/04/2010","01/09/2010","")
			oItems:AddBar(oItems:AddItem("Solid Gradient 3 Colors"),"HGrad4","01/04/2010","01/09/2010","")
			oItems:AddBar(oItems:AddItem("Gradient Shadow"),"HGrad5","01/04/2010","01/09/2010","")
			oItems:AddBar(oItems:AddItem("Solid Gradient"),"VGrad1","01/04/2010","01/09/2010","")
			oItems:AddBar(oItems:AddItem("Pattern Gradient"),"VGrad2","01/04/2010","01/09/2010","")
			oItems:AddBar(oItems:AddItem("Pattern Gradient 3 Colors"),"VGrad3","01/04/2010","01/09/2010","")
			oItems:AddBar(oItems:AddItem("Solid Gradient 3 Colors"),"VGrad4","01/04/2010","01/09/2010","")
			oItems:AddBar(oItems:AddItem("Gradient Shadow"),"VGrad5","01/04/2010","01/09/2010","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1198
Is it possible to display the bars with a thicker border

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():SetProperty("PaneWidth",.F.,48)
		oG2antt:Chart():Bars():CallMethod("Copy","Task","TaskB"):Pattern := 4099/*exPatternThickBox+exPatternShadow*/
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/05/2001","")
			oItems:AddBar(oItems:AddItem("Task 2"),"TaskB","01/02/2001","01/05/2001","")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","01/02/2001","01/05/2001","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1197
Is it possible to display the shadow for EBN bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():SetProperty("PaneWidth",.F.,48)
		oBar := oG2antt:Chart():Bars():CallMethod("Copy","Task","EBN")
			oBar:SetProperty("Color",0x1000000)
			oBar:Pattern := 8192/*exPatternFrameShadow*/
		oG2antt:Chart():Bars():CallMethod("Copy","Task","EBN2"):SetProperty("Color",0x1000000)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"EBN2","01/02/2001","01/05/2001","")
			oItems:AddBar(oItems:AddItem("Task 2"),"EBN","01/02/2001","01/05/2001","")
			oItems:AddBar(oItems:AddItem("Task 3"),"EBN2","01/02/2001","01/05/2001","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1196
Can I display a shadow for my bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():SetProperty("PaneWidth",.F.,48)
		oG2antt:Chart():Bars:Item("Task"):Pattern := 8195/*exPatternFrameShadow+exPatternShadow*/
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/05/2001","")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/05/2001","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1195
How can I use the Color property for gradient bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():SetProperty("PaneWidth",.F.,48)
		oBar := oG2antt:Chart():Bars():Add("V")
			oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
			oBar:SetProperty("EndColor",oBar:StartColor())
			oBar:Pattern := 224/*exPatternGradient3Colors+exPatternGradientVBox+exPatternBox*/
			oBar:Height := -1
		oBar1 := oG2antt:Chart():Bars():Add("H")
			oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oBar1:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
			oBar1:SetProperty("EndColor",oBar1:StartColor())
			oBar1:Pattern := 160/*exPatternGradient3Colors+exPatternBox*/
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"V","01/02/2001","01/05/2001","")
			oItems:AddBar(oItems:AddItem("Task 2"),"H","01/02/2001","01/05/2001","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1194
Is there any option to show bars with vertical gradient

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oBar := oG2antt:Chart():Bars:Item("Task")
			oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
			oBar:SetProperty("EndColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,0 } )  , .F. ))
			oBar:Pattern := 96/*exPatternGradientVBox+exPatternBox*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2001","01/05/2001","")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1193
How can I define a new milestone bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oBars
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oBars := oG2antt:Chart():Bars()
			oBars:AddShapeCorner(12345,1)
			oBars:AddShapeCorner(12346,2)
			oBars:CallMethod("Copy","Milestone","M1"):StartShape := 12345/*0x3020+exShapeIconVBar+exShapeIconRight*/
			oBars:CallMethod("Copy","Milestone","M2"):StartShape := 12346/*0x3020+exShapeIconSquare+exShapeIconRight*/
			oBar := oBars:CallMethod("Copy","Milestone","MP")
				oBar:StartShape := 20/*exShapeIconStar*/
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Default"),"Milestone","01/02/2001","01/02/2001")
			oItems:AddBar(oItems:AddItem("Predefined"),"MP","01/03/2001","01/03/2001")
			oItems:AddBar(oItems:AddItem("Custom 1"),"M1","01/04/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Custom 2"),"M2","01/05/2001","01/05/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1192
How can I define my milestone bar, using my icons or pictures
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBars
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oBars := oG2antt:Chart():Bars()
			oBars:AddShapeCorner(12345,1)
			oBars:Item("Milestone"):StartShape := 12345/*0x3020+exShapeIconVBar+exShapeIconRight*/
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Milestone","01/02/2001","01/02/2001")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1191
Is it possible to specify manually non-working days instead using the NonworkingDays as being repetitive

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:FirstVisibleDate := "01/01/2010"
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oChart:Level(0):DrawGridLines := .T.
			oChart:ShowNonworkingUnits := .F.
			oChart:ShowNonworkingDates := .F.
			oChart:NonworkingDays := 0
			oChart:AddNonworkingDate("01/10/2010")
			oChart:AddNonworkingDate("01/11/2010")
			oChart:AddNonworkingDate("01/15/2010")
			oChart:AddNonworkingDate("01/16/2010")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1190
Is it possible to hide specific days

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:FirstVisibleDate := "01/01/2010"
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oChart:Level(0):DrawGridLines := .T.
			oChart:ShowNonworkingUnits := .F.
			oChart:ShowNonworkingDates := .F.
			oChart:NonworkingDays := 128
			oChart:AddNonworkingDate("01/10/2010")
			oChart:AddNonworkingDate("01/11/2010")
			oChart:AddNonworkingDate("01/15/2010")
			oChart:AddNonworkingDate("01/16/2010")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1189
Is it possible to show or display the marked zones ONLY in the overview part of the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/14/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:AllowLinkBars := .F.
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:OverviewVisible := 2/*exOverviewShowAllVisible*/
			oChart:Bars:Item("Task"):Pattern := 1/*exPatternSolid*/
			oChart:MarkTimeZone("Z1","01/03/2001","01/04/2001",oChart:BackColor(),";;Zone <b>1</b>")
			oChart:MarkTimeZone("Z2","02/06/2001","02/07/2001",oChart:BackColor(),";;Zone <b>2</b>")
			oChart:MarkTimeZone("Z3","01/16/2001","01/19/2001",oChart:BackColor(),";;Zone <b>3</b>")
			oChart:OverviewShowMarkTimeZones := .T.
			oChart:SetProperty("OverviewBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 220,240,240 } )  , .F. ))
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/05/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","02/05/2001","02/08/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1188
Is it possible to show or display the marked zones in the overview part of the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/14/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:AllowLinkBars := .F.
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:OverviewVisible := 2/*exOverviewShowAllVisible*/
			oChart:Bars:Item("Task"):Pattern := 1/*exPatternSolid*/
			oChart:MarkTimeZone("Z1","01/03/2001","01/04/2001",16777056)
			oChart:MarkTimeZone("Z2","02/06/2001","02/07/2001",16744544)
			oChart:MarkTimeZone("Z3","01/16/2001","01/19/2001",16744544)
			oChart:OverviewShowMarkTimeZones := .T.
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/05/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","02/05/2001","02/08/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1187
Is there a quick way to determine if a bar belongs to a group
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,64)
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","K2")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/05/2001","01/07/2001","K3")
			oItems:GroupBars(h1,"K1",.T.,h2,"K2",.T.)
			oItems:GroupBars(h1,"K1",.F.,h2,"K2",.F.)
			oItems:GroupBars(h1,"K1",.T.,h3,"K3",.T.)
			oItems:GroupBars(h1,"K1",.F.,h3,"K3",.F.)
			DevOut( Transform(oItems:ItemBar(h1,"K1",522/*exBarsGroup*/),"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1186
I am using the ScrollRange property to limit the chart's visible area, but it does not work as expected. What could be wrong
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,56)
			oChart:SetProperty("ScrollRange",0/*exStartDate*/,"01/01/0100")
			oChart:SetProperty("ScrollRange",1/*exEndDate*/,"12/31/9999")
			oChart:FirstVisibleDate := "04/28/2010"
		oG2antt:SetProperty("ScrollPartCaption",2/*exHChartScroll*/,512/*exLowerBackPart*/,Transform(oG2antt:Chart:ScrollRange(0/*exStartDate*/),""))
		oG2antt:SetProperty("ScrollPartCaptionAlignment",2/*exHChartScroll*/,512/*exLowerBackPart*/,0/*LeftAlignment*/)
		oG2antt:SetProperty("ScrollPartCaption",2/*exHChartScroll*/,128/*exUpperBackPart*/,Transform(oG2antt:Chart:ScrollRange(1/*exEndDate*/),""))
		oG2antt:SetProperty("ScrollPartCaptionAlignment",2/*exHChartScroll*/,128/*exUpperBackPart*/,2/*RightAlignment*/)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1185
Are you planning to add a AddNonworkingDate / AddNonworkingDay for separate items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:AllowChartScrollPage := .T.
		oG2antt:Columns():Add("Non-Work")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "04/04/2009"
			oChart:SetProperty("PaneWidth",.F.,52)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			oItems:AddItem("Default")
			oItems:SetProperty("ItemNonworkingUnits",oItems:AddItem("Test 1"),.F.,"shortdate(value) in (#4/5/2009#,#4/6/2009#)")
			oItems:SetProperty("ItemNonworkingUnits",oItems:AddItem("Test 2"),.F.,"shortdate(value) in (#4/6/2009#,#4/7/2009#)")
			oItems:SetProperty("ItemNonworkingUnits",oItems:AddItem("Test 3"),.F.,"shortdate(value) in (#4/7/2009#,#4/9/2009#)")
			oItems:AddItem("Default")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1184
How can I enlarge the EBN being applied to an object

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 32
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(2,"c:\exontrol\images\normal.ebn")
			oAppearance:Add(1,"CP:2 -3 -2 3 2")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2002"
			oChart:SetProperty("SelBarColor",0x1000000)
			oChart:SetProperty("PaneWidth",.F.,48)
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2002","01/04/2002","A")
			oItems:AddBar(h,"Task","01/06/2002","01/10/2002","B")
			oItems:AddBar(h,"Task","01/11/2002","01/14/2002","C")
			oItems:SetProperty("ItemBar",h,"A",257/*exBarSelected*/,.T.)
			oItems:SetProperty("ItemBar",h,"B",257/*exBarSelected*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1183
I am using EBN to display my bars but the bars shows in black in the overview area. Is there any option to specify a different color in the overview part of the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oChart := oG2antt:Chart()
			oChart:Bars:Item("Task"):SetProperty("Color",0x1000000)
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:OverviewVisible := 2/*exOverviewShowAllVisible*/
			oChart:FirstVisibleDate := "01/11/2001"
			oChart:LevelCount := 2
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001",1)
			oItems:SetProperty("ItemBar",h,1,41/*exBarOverviewColor*/,8821418)
			oItems:AddBar(h,"Task","02/02/2001","02/04/2001",2)
			oItems:SetProperty("ItemBar",h,2,41/*exBarOverviewColor*/,8821418)
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","02/02/2001","02/04/2001","")
			oItems:SetProperty("ItemBar",h,"",41/*exBarOverviewColor*/,8821418)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1182
I haven't found options to localize (in Italian) the strings ( dates, tooltip ) that shows in the chart area

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:SetProperty("Label",256/*exWeek*/,"<|><%ww%><|><%d%> <%m3%> '<%yy%><r><%ww%><|><%d%> <%mmmm%> <%yyyy%><r><%ww%><||><||>256")
			oChart:SetProperty("Label",4096/*exDay*/,"<|><%d1%><|><%d2%><|><%d3%><|><%dddd%><|><%d3%> <%d%> <%m3%> '<%yy%><|><%dddd%> <%d%> <%mmmm%> <%yyyy%><||><||>4096")
			oChart:SetProperty("LabelToolTip",256/*exWeek*/,"<%d%> <%mmmm%> <%yyyy%> <%ww%>")
			oChart:SetProperty("LabelToolTip",4096/*exDay*/,"<%dddd%> <%d%> <%mmmm%> <%yyyy%>")
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:MonthNames := "gennaio febbraio marzo aprile maggio giugno luglio agosto settembre ottobre novembre dicembre"
			oChart:WeekDays := "domenica lunedì martedì mercoledì giovedì venerdì sabato"
			oChart:ToolTip := "<%dddd%> <%d%> <%mmmm%> <%yyyy%>"
			oChart:UnitScale := 4096/*exDay*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1181
I haven't found options to localize (in Dutch) the strings ( dates, tooltip ) that shows in the chart area

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:SetProperty("Label",256/*exWeek*/,"<|><%ww%><|><%d%> <%m3%> '<%yy%><r><%ww%><|><%d%> <%mmmm%> <%yyyy%><r><%ww%><||><||>256")
			oChart:SetProperty("Label",4096/*exDay*/,"<|><%d1%><|><%d2%><|><%d3%><|><%dddd%><|><%d3%> <%d%> <%m3%> '<%yy%><|><%dddd%> <%d%> <%mmmm%> <%yyyy%><||><||>4096")
			oChart:SetProperty("LabelToolTip",256/*exWeek*/,"<%d%> <%mmmm%> <%yyyy%> <%ww%>")
			oChart:SetProperty("LabelToolTip",4096/*exDay*/,"<%dddd%> <%d%> <%mmmm%> <%yyyy%>")
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:MonthNames := "januari februari maart april mei juni juli augusts september oktober november december"
			oChart:WeekDays := "zondag maandag dinsdag woensdag donderdag vrijdag zaterdag"
			oChart:ToolTip := "<%dddd%> <%d%> <%mmmm%> <%yyyy%>"
			oChart:UnitScale := 4096/*exDay*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1180
I haven't found options to localize (in German) the strings ( dates, tooltip ) that shows in the chart area (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:SetProperty("Label",256/*exWeek*/,"<|><%ww%><|><%d%> <%m3%> '<%yy%><r><%ww%><|><%d%>.<%mmmm%> <%yyyy%><r><%ww%><||><||>256")
			oChart:SetProperty("Label",4096/*exDay*/,"<|><%d1%><|><%d2%><|><%d3%><|><%dddd%><|><%d3%> <%d%>.<%m3%> '<%yy%><|><%dddd%> <%d%>.<%mmmm%> <%yyyy%><||><||>4096")
			oChart:SetProperty("LabelToolTip",256/*exWeek*/,"<%d%>.<%mmmm%> <%yyyy%> <%ww%>")
			oChart:SetProperty("LabelToolTip",4096/*exDay*/,"<%dddd%>, <%d%>.<%mmmm%> <%yyyy%>")
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:MonthNames := "Januar Februar März April Mai Juni Juli August September Oktober November Dezember"
			oChart:WeekDays := "Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag"
			oChart:ToolTip := "<%dddd%>,<%d%>.<%mmmm%> <%yyyy%>"
			oChart:UnitScale := 4096/*exDay*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1179
I haven't found options to localize (in French) the strings ( dates, tooltip ) that shows in the chart area

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:SetProperty("Label",256/*exWeek*/,"<|><%ww%><|><%d%> <%m3%> '<%yy%><r><%ww%><|><%d%> <%mmmm%> <%yyyy%><r><%ww%><||><||>256")
			oChart:SetProperty("Label",4096/*exDay*/,"<|><%d1%><|><%d2%><|><%d3%><|><%dddd%><|><%d3%> <%d%> <%m3%> '<%yy%><|><%dddd%> <%d%> <%mmmm%> <%yyyy%><||><||>4096")
			oChart:SetProperty("LabelToolTip",256/*exWeek*/,"<%d%> <%mmmm%> <%yyyy%> <%ww%>")
			oChart:SetProperty("LabelToolTip",4096/*exDay*/,"<%dddd%> <%d%> <%mmmm%> <%yyyy%>")
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:MonthNames := "janvier février mars avril mai juin juillet août septembre octobre novembre décembre"
			oChart:WeekDays := "dimanche lundi mardi mercredi jeudi vendredi samedi"
			oChart:ToolTip := "<%dddd%> <%d%> <%mmmm%> <%yyyy%>"
			oChart:UnitScale := 4096/*exDay*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1178
How can I determine the last visible date in the chart
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	DevOut( "First" )
	DevOut( Transform(oG2antt:Chart:FirstVisibleDate(),"") )
	DevOut( "Last" )
	DevOut( Transform(oG2antt:Chart:DateFromPoint(1,-1),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1177
How can I filter programatically using more columns
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:MarkSearchColumn := .F.
		oColumns := oG2antt:Columns()
			oColumns:Add("Car")
			oColumns:Add("Equipment")
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("Mazda"),1,"Air Bag")
			oItems:SetProperty("CellValue",oItems:AddItem("Toyota"),1,"Air Bag,Air condition")
			oItems:SetProperty("CellValue",oItems:AddItem("Ford"),1,"Air condition")
			oItems:SetProperty("CellValue",oItems:AddItem("Nissan"),1,"Air Bag,ABS,ESP")
			oItems:SetProperty("CellValue",oItems:AddItem("Mazda"),1,"Air Bag, ABS,ESP")
			oItems:SetProperty("CellValue",oItems:AddItem("Mazda"),1,"ABS,ESP")
		oColumn := oG2antt:Columns:Item("Car")
			oColumn:FilterType := 240/*exFilter*/
			oColumn:Filter := "Mazda"
		oColumn1 := oG2antt:Columns:Item("Equipment")
			oColumn1:FilterType := 3/*exPattern*/
			oColumn1:Filter := "*ABS*|*ESP*"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1176
Do you have scheduling functionality in Gantt (meaning scheduling several activities (bars) depending on their start and finish dates with considering dependencies to other activities
PROCEDURE OnBarResize(oG2antt,Item,Key)
	oG2antt:Items():SchedulePDM(Item,Key)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3,h4

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BarResize := {|Item,Key| OnBarResize(oG2antt,Item,Key)} /*Occurs when a bar is moved or resized.*/

		oG2antt:BeginUpdate()
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oG2antt:Columns():Add("Task")
		oG2antt:Columns():Add("Working"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,258)
		oChart := oG2antt:Chart()
			oChart:Bars():Add("Task:Split"):Shortcut := "Task"
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:AllowLinkBars := .F.
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/02/2001","01/04/2001","")
			oItems:AddLink("L1",h1,"",h2,"")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/02/2001","01/06/2001","")
			oItems:AddLink("L2",h2,"",h3,"")
			oItems:SetProperty("Link","L2",12/*exLinkText*/,"FF")
			oItems:SetProperty("Link","L2",6/*exLinkStartPos*/,2)
			oItems:SetProperty("Link","L2",7/*exLinkEndPos*/,2)
			h4 := oItems:AddItem("Task 4")
			oItems:AddBar(h4,"Task","01/02/2001","01/04/2001","")
			oItems:AddLink("L3",h4,"",h3,"")
			oItems:SetProperty("ItemBar",0,"<*>",20/*exBarKeepWorkingCount*/,.T.)
			oItems:SchedulePDM(oItems:FirstVisibleItem(),"")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1175
How can I show the ticks for a single slider field
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oEditor
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Slider"):Editor():EditType := 20/*SliderType*/
		oItems := oG2antt:Items()
			oItems:AddItem(10)
			oEditor := oItems:CellEditor(oItems:AddItem(20),0)
				oEditor:EditType := 20/*SliderType*/
				oEditor:SetProperty("Option",53/*exSliderTickFrequency*/,10)
			oItems:AddItem(30)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1174
Is it possible to show ticks for slider fields
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oEditor

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oEditor := oG2antt:Columns():Add("Slider"):Editor()
			oEditor:EditType := 20/*SliderType*/
			oEditor:SetProperty("Option",53/*exSliderTickFrequency*/,10)
		oG2antt:Items():AddItem(10)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1173
How can I group two bars so the distance between them is limited to a specified range

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/21/2006","09/24/2006")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Unknown","09/25/2006","09/28/2006")
			oItems:AddLink("L1",h1,"",h2,"")
			oItems:GroupBars(h1,"",.F.,h2,"",.T.,31,"1;2")
			DevOut( "The distance between A and B is limited between 1 and 3 days" )
			DevOut( "The B is always after the A" )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1172
How can I group two bars so the distance between them is flexible but never less than a specified value

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/21/2006","09/24/2006")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Unknown","09/26/2006","09/29/2006")
			oItems:AddLink("L1",h1,"",h2,"")
			oItems:GroupBars(h1,"",.F.,h2,"",.T.,39,"2")
			DevOut( "The distance between A and B is never less than 2 days" )
			DevOut( "The B is always after the A" )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1171
How can I group two bars so the distance between them is flexible

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/21/2006","09/24/2006")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Unknown","09/26/2006","09/29/2006")
			oItems:AddLink("L1",h1,"",h2,"")
			oItems:GroupBars(h1,"",.F.,h2,"",.T.,39)
			DevOut( "The distance between A and B is flexible, unlimited" )
			DevOut( "The B is always after the A" )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1170
How can I group two bars so the interval between them is fixed

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","09/21/2006","09/24/2006","T1","A")
			oItems:AddBar(h,"Unknown","09/26/2006","09/29/2006","T2","B")
			oItems:AddLink("L",h,"T1",h,"T2")
			oItems:SetProperty("Link","L",258/*exLinkGroupBars*/,27)
			oItems:SetProperty("Link","L",11/*exLinkShowDir*/,.F.)
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Unknown","09/26/2006","09/29/2006","T2","B")
			oItems:AddLink("L2",h,"T1",h2,"T2")
			oItems:SetProperty("Link","L2",258/*exLinkGroupBars*/,27)
			oItems:SetProperty("Link","L2",11/*exLinkShowDir*/,.F.)
			DevOut( "The distance between bars is constant" )
			DevOut( "The B is always after the A" )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1169
How can I group two bars when linking, so moving the first bar will makes the second to move accordingly

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","09/21/2006","09/24/2006","","A")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Unknown","09/26/2006","09/29/2006","","B")
			oItems:AddLink("L1",h1,"",h2,"")
			oItems:SetProperty("Link","L1",258/*exLinkGroupBars*/,39)
			DevOut( "The distance between A and B is flexible, unlimited" )
			DevOut( "The B is always after the A" )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1168
Is it possible to be notified when the user clicks an anchor element a hyperlink in the date-time zone

PROCEDURE OnAnchorClick(oG2antt,AnchorID,Options)
	DevOut( "Click: " )
	DevOut( Transform(AnchorID,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AnchorClick := {|AnchorID,Options| OnAnchorClick(oG2antt,AnchorID,Options)} /*Occurs when an anchor element is clicked.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:MarkTimeZone("Z","01/02/2001","01/05/2001",15753471,";32;Caption <a1><b>1</b></a>;1;Caption <a2><b>2</b></a>;17;Caption <a3><b>3</b></a>")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1167
Is it possible to be notified when the user clicks a date-time zone

PROCEDURE OnClick(oG2antt)
	LOCAL oChart
	oChart := oG2antt:Chart()
		DevOut( "Click: " )
		DevOut( Transform(oChart:TimeZoneFromPoint(-1,-1),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Click := {|| OnClick(oG2antt)} /*Occurs when the user presses and then releases the left mouse button over the tree control.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:MarkTimeZone("Z","01/02/2001","01/05/2001",16711680,";32;DATE-TIME<br>    ZONE")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1166
Is is possible to display multiple captions in the same date-time zone

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:MarkTimeZone("Z","01/05/2001","01/08/2001",12895487,";;Caption <b>1</b>;1;Caption <b>2</b>;17;Caption <b>3</b>")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1165
Is is possible to align on the top the caption for the date-time zone

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:MarkTimeZone("Z","01/05/2001","01/08/2001",12895487,";;UpperCenter;1")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1164
Is there any option to display a picture on the date-time zone

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:SetProperty("HTMLPicture","pic1","c:\exontrol\images\card.png")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:MarkTimeZone("Z","01/05/2001","01/08/2001",12895487,";;<c><img>pic1</img><br><c>picture")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1163
Is there any option to display a text or a HTML caption on the date-time zone

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:MarkTimeZone("Z1","01/01/2001","01/04/2001",12895487,";;zone <b>1</b>")
			oChart:MarkTimeZone("Z2","01/05/2001","01/08/2001",12895487,";;zone <b>2</b>")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1162
How can I display the date-time zone using a semi-transparent EBN object

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:AllowLinkBars := .F.
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:Bars:Item("Task"):Pattern := 1/*exPatternSolid*/
			oChart:MarkTimeZone("Z1","01/02/2001","01/03/2001",16777056,";;Solid")
			oChart:MarkTimeZone("Z2","01/07/2001","01/10/2001",16777216,"50;;EBN")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/08/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1161
How can I display the date-time zone using an EBN or a skin instead a solid color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:AllowLinkBars := .F.
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:Bars:Item("Task"):Pattern := 1/*exPatternSolid*/
			oChart:MarkTimeZone("Z1","01/02/2001","01/03/2001",16777056,";;Solid")
			oChart:MarkTimeZone("Z2","01/05/2001","01/08/2001",16777216,";;EBN")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/08/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1160
How can I display the date-time zone using a pattern instead a solid color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:AllowLinkBars := .F.
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:Bars:Item("Task"):Pattern := 1/*exPatternSolid*/
			oChart:MarkTimeZone("Z1","01/02/2001","01/03/2001",16777056,";;Solid")
			oChart:MarkTimeZone("Z2","01/06/2001","01/07/2001",16777056,";12;Pattern")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/08/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1159
How can I display the date-time zone using a transparent color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:AllowLinkBars := .F.
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:Bars:Item("Task"):Pattern := 1/*exPatternSolid*/
			oChart:MarkTimeZone("Z1","01/02/2001","01/03/2001",16777056,";;Opaque")
			oChart:MarkTimeZone("Z2","01/06/2001","01/07/2001",16777056,"50;;Semi-Transparent")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/08/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1158
The date time zone is shown behind the bars, is there any way to show it over

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:AllowLinkBars := .F.
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:Bars:Item("Task"):Pattern := 1/*exPatternSolid*/
			oChart:MarkTimeZone("Z1","01/02/2001","01/03/2001",16777056)
			oChart:MarkTimeZone("Z2","01/06/2001","01/07/2001",16777056,"1")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/08/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1157
How can I get ifnromation about a date-time zone
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL oChart
	oChart := oG2antt:Chart()
		DevOut( Transform(oChart:TimeZoneInfo(oChart:TimeZoneFromPoint(-1,-1)),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,18)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2010"
			oChart:MarkTimeZone("Z1","01/04/2010","01/08/2010",16744544)
			oChart:MarkTimeZone("Z2","01/12/2010","01/18/2010",16761952)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1156
How can I determine the zone from the cursor
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL oChart
	oChart := oG2antt:Chart()
		DevOut( Transform(oChart:TimeZoneFromPoint(-1,-1),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,18)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2010"
			oChart:MarkTimeZone("Z1","01/04/2010","01/08/2010",16744544)
			oChart:MarkTimeZone("Z2","01/12/2010","01/18/2010",16761952)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1155
How can I highlight multiple date-time zones (ranges)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,18)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2010"
			oChart:MarkTimeZone("Z1","01/04/2010","01/08/2010",16744544)
			oChart:MarkTimeZone("Z2","01/12/2010","01/18/2010",16761952)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1154
How can I highlight a date-time range
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,18)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2010"
			oChart:MarkTimeZone("Z1","01/04/2010","01/08/2010",16744544)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1153
How do I get the list of selected date
PROCEDURE OnChartEndChanging(oG2antt,Operation)
	DevOut( Transform(Operation,"") )
	DevOut( Transform(oG2antt:Chart:SelectDates(),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:ChartEndChanging := {|Operation| OnChartEndChanging(oG2antt,Operation)} /*Occurs after the chart has been changed.*/

		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:SetProperty("MarkTodayColor",oChart:BackColor())

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1152
Is there any function I can use to find the bars that intersect with the current bar

PROCEDURE OnBarResizing(oG2antt,Item,Key)
	LOCAL oItems
	oItems := oG2antt:Items()
		DevOut( Transform(Key,"") )
		DevOut( "intesect with" )
		DevOut( Transform(oItems:ItemBar(Item,Key,520/*exBarIntersectWithAsString*/),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BarResizing := {|Item,Key| OnBarResizing(oG2antt,Item,Key)} /*Occurs when a bar is moving or resizing.*/

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:LevelCount := 2
			oChart:Bars:Item("Task"):OverlaidType := 1/*exOverlaidBarsOffset*/
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Default")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","A1","A1")
			oItems:AddBar(h1,"Task","01/03/2001","01/05/2001","A2","A2")
			oItems:AddBar(h1,"Task","01/04/2001","01/07/2001","A3","A3")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1151
Is it possible to order the bars on top of other bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:LevelCount := 2
			oChart:Bars():CallMethod("Copy","Task","NTask"):OverlaidType := 1/*exOverlaidBarsOffset*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Default")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h1,"Task","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h1,"Task","01/04/2001","01/07/2001","A3")
			h2 := oItems:AddItem("Overlaid")
			oItems:AddBar(h2,"NTask","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h2,"NTask","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h2,"NTask","01/04/2001","01/07/2001","A3")
			oItems:GroupBars(h1,"A1",.T.,h2,"A1",.T.)
			oItems:GroupBars(h1,"A1",.F.,h2,"A1",.F.)
			oItems:GroupBars(h1,"A2",.T.,h2,"A2",.T.)
			oItems:GroupBars(h1,"A2",.F.,h2,"A2",.F.)
			oItems:GroupBars(h1,"A3",.T.,h2,"A3",.T.)
			oItems:GroupBars(h1,"A3",.F.,h2,"A3",.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1150
Is it possible to order the bars on top of other bars (have different colurs so that they can be seen)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:LevelCount := 2
			oChart:Bars():CallMethod("Copy","Task","NTask"):OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Default")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h1,"Task","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h1,"Task","01/04/2001","01/07/2001","A3")
			h2 := oItems:AddItem("Overlaid")
			oItems:AddBar(h2,"NTask","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h2,"NTask","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h2,"NTask","01/04/2001","01/07/2001","A3")
			oItems:GroupBars(h1,"A1",.T.,h2,"A1",.T.)
			oItems:GroupBars(h1,"A1",.F.,h2,"A1",.F.)
			oItems:GroupBars(h1,"A2",.T.,h2,"A2",.T.)
			oItems:GroupBars(h1,"A2",.F.,h2,"A2",.F.)
			oItems:GroupBars(h1,"A3",.T.,h2,"A3",.T.)
			oItems:GroupBars(h1,"A3",.F.,h2,"A3",.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1149
Is it possible to layer bars on top of other bars (have different colurs so that they can be seen)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 22
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:LevelCount := 2
			oChart:Bars():CallMethod("Copy","Task","NTask"):OverlaidType := 1/*exOverlaidBarsOffset*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Default")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h1,"Task","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h1,"Task","01/04/2001","01/07/2001","A3")
			h2 := oItems:AddItem("Overlaid")
			oItems:AddBar(h2,"NTask","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h2,"NTask","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h2,"NTask","01/04/2001","01/07/2001","A3")
			oItems:GroupBars(h1,"A1",.T.,h2,"A1",.T.)
			oItems:GroupBars(h1,"A1",.F.,h2,"A1",.F.)
			oItems:GroupBars(h1,"A2",.T.,h2,"A2",.T.)
			oItems:GroupBars(h1,"A2",.F.,h2,"A2",.F.)
			oItems:GroupBars(h1,"A3",.T.,h2,"A3",.T.)
			oItems:GroupBars(h1,"A3",.F.,h2,"A3",.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1148
My skin(EBN) bars are not shown a different color in the overview. What can I do

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oChart := oG2antt:Chart()
			oChart:Bars:Item("Task"):SetProperty("Color",0x1000000)
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:OverviewVisible := 2/*exOverviewShowAllVisible*/
			oChart:FirstVisibleDate := "01/11/2001"
			oChart:LevelCount := 2
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001",1)
			oItems:AddBar(h,"Task","02/02/2001","02/04/2001",2)
			oItems:SetProperty("ItemBar",h,2,33/*exBarColor*/,16776960)
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","02/02/2001","02/04/2001","")
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,255)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1147
How do I colour the lines in the overview section to match the bars they represent on the main chart

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:OverviewVisible := 2/*exOverviewShowAllVisible*/
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001",1)
			oItems:AddBar(h,"Task","02/02/2001","02/04/2001",2)
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","02/02/2001","02/04/2001","")
			oItems:SetProperty("ItemBar",h,"",33/*exBarColor*/,255)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1146
How do I catch the delete key (down) on a bar
PROCEDURE OnKeyDown(oG2antt,KeyCode,Shift)
	DevOut( Transform(KeyCode,"") )
	DevOut( Transform(Shift,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:KeyDown := {|KeyCode,Shift| OnKeyDown(oG2antt,KeyCode,Shift)} /*Occurs when the user presses a key while an object has the focus.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/27/2000"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oBar := oChart:Bars:Item("Task")
				oBar:Pattern := 32/*exPatternBox*/
				oBar:Height := 13
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1","This is a bit of text that is not clipped")
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1","This is a bit of text that get's clipped")
			oItems:SetProperty("ItemBar",h,"K1",4/*exBarHAlignCaption*/,3)
			oItems:SetProperty("ItemBar",h,"K1",6/*exBarToolTip*/,oItems:ItemBar(h,"K1",3/*exBarCaption*/))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1145
Is it possible to colour a particular column, I mean the cell's foreground color
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumns
	LOCAL oConditionalFormat
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oConditionalFormat := oG2antt:ConditionalFormats():Add("1")
			oConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oConditionalFormat:ApplyTo := 1/*0x1+*/
		oG2antt:MarkSearchColumn := .F.
		oColumns := oG2antt:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2")
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem(0),1,1)
			oItems:SetProperty("CellValue",oItems:AddItem(2),1,3)
			oItems:SetProperty("CellValue",oItems:AddItem(4),1,5)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1144
Is it possible to colour a particular column for specified values
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumns
	LOCAL oConditionalFormat
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oConditionalFormat := oG2antt:ConditionalFormats():Add("int(%1) in (3,4,5)")
			oConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oConditionalFormat:ApplyTo := 1/*0x1+*/
		oG2antt:MarkSearchColumn := .F.
		oColumns := oG2antt:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2")
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem(0),1,1)
			oItems:SetProperty("CellValue",oItems:AddItem(2),1,3)
			oItems:SetProperty("CellValue",oItems:AddItem(4),1,5)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1143
Is it possible to colour a particular column
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oColumns := oG2antt:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2"):SetProperty("Def",4/*exCellBackColor*/,255)
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem(0),1,1)
			oItems:SetProperty("CellValue",oItems:AddItem(2),1,3)
			oItems:SetProperty("CellValue",oItems:AddItem(4),1,5)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1142
How do i get all the children items that are under a certain parent Item handle
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems,oItems1
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Columns():Add("P")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oItems1 := oG2antt:Items()
			hChild := oItems1:ItemChild(oItems1:FirstVisibleItem())
			DevOut( Transform(oItems1:CellValue(hChild,0),"") )
			DevOut( Transform(oItems1:CellValue(oItems1:NextSiblingItem(hChild),0),"") )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1141
How can I access the control's scroll bar so I can change its appearance
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.F.,0)
		oG2antt:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
		oG2antt:SetProperty("Background",388/*exHSThumb*/,0x1000000)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1140
How can I show my bars using the parts of the current theme
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oBars
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"XP:Button 1 1")
			oAppearance:Add(2,"XP:Button 1 2")
			oAppearance:Add(3,"XP:ScrollBar 3 1")
			oAppearance:Add(4,"XP:ScrollBar 3 2")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oBars := oChart:Bars()
				oBars:Add("B1"):SetProperty("Color",0x1000000)
				oBars:Add("B2"):SetProperty("Color",0x2000000)
				oBars:Add("S1"):SetProperty("Color",0x3000000)
				oBars:Add("S2"):SetProperty("Color",0x4000000)
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Button1"),"B1","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Button 2"),"B2","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Scrollbar 1"),"S1","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Scrollbar 2"),"S2","01/02/2001","01/04/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1139
How do I hide the text on a bar if the text is to big for the bar length

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/27/2000"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oBar := oChart:Bars:Item("Task")
				oBar:Pattern := 32/*exPatternBox*/
				oBar:Height := 13
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1","This is a bit of text that is not clipped")
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1","This is a bit of text that get's clipped")
			oItems:SetProperty("ItemBar",h,"K1",4/*exBarHAlignCaption*/,3)
			oItems:SetProperty("ItemBar",h,"K1",6/*exBarToolTip*/,oItems:ItemBar(h,"K1",3/*exBarCaption*/))

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1138
Is it possible to change the color for non-working parts of the bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:Bars():Add("Task:Split"):Shortcut := "Task"
			oChart:SetProperty("NonworkingDaysColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,250,240 } )  , .F. ))
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001","01/16/2001")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/02/2001","01/16/2001","")
			oItems:SetProperty("ItemBar",h,"",40/*exBarNonWorkingColor*/,65280)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1137
Is it possible to change the color for the percent bar being displayed inside a specified bar only

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():Bars():Add("Task%Progress")
		oG2antt:Chart():SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task%Progress","01/02/2001","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",12/*exBarPercent*/,0.4)
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task%Progress","01/02/2001","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",12/*exBarPercent*/,0.5)
			oItems:SetProperty("ItemBar",h,"K1",39/*exBarPercentColor*/,255)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1136
How do I get a handle on the item before adding the bar
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:MarkSearchColumn := .F.
		oG2antt:OnResizeControl := 1/*exResizeChart*/
		oG2antt:Columns():Add("Tasks")
		oG2antt:Columns():Add("Start"):Visible := .F.
		oG2antt:Columns():Add("End"):Visible := .F.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 0")
			oItems:SetProperty("CellValue",h1,1,"09/21/2006")
			oItems:SetProperty("CellValue",h1,2,"09/24/2006")
			oItems:AddBar(h1,"Task",oItems:CellValue(h1,1),oItems:CellValue(h1,2))
			h2 := oItems:InsertItem(h,,"Task 1")
			oItems:SetProperty("CellValue",h2,1,"09/25/2006")
			oItems:SetProperty("CellValue",h2,2,"09/28/2006")
			oItems:AddBar(h2,"Task",oItems:CellValue(h2,1),oItems:CellValue(h2,2))
			h3 := oItems:InsertItem(h,,"Task 2")
			oItems:SetProperty("CellValue",h3,1,"09/29/2006")
			oItems:SetProperty("CellValue",h3,2,"10/02/2006")
			oItems:AddBar(h3,"Task",oItems:CellValue(h3,1),oItems:CellValue(h3,2))
			oItems:AddItem(oItems:ItemCount())
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1135
Is there an Items method that I can use to loop around to compare the item's user data against
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:SetProperty("ItemData",oItems:InsertItem(h,,"Child 2"),1234)
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBold",oItems:FindItemData(1234),.T.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1134
How do I make the tooltip box wider to allow for longer text

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:ToolTipWidth := 328
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",6/*exBarToolTip*/,"This is a bit of text that's displayed when the cursor hovers the bar")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1133
How do i set the default timeslots to say hours or minutes

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:OverviewVisible := 2/*exOverviewShowAllVisible*/
			oChart:LevelCount := 2
			oChart:AllowOverviewZoom := 1/*exAlwaysZoom*/
			oChart:OverviewZoomUnit := 24
			oChart:OverviewZoomCaption := "Y|½Y|¼Y|Mo|T|W|D|H|Mi|S"
			oChart:UnitScale := 1048576/*exMinute*/
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/16/2001","01/25/2001")
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 4"),"Task","02/16/2001","02/25/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1132
Can I use icons or images in the text in the overview zoom buttons (Sec., Min., Hour, Month...)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:SetProperty("HTMLPicture","pic1","c:\exontrol\images\zipdisk.gif")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:OverviewVisible := 2/*exOverviewShowAllVisible*/
			oChart:LevelCount := 2
			oChart:AllowOverviewZoom := 1/*exAlwaysZoom*/
			oChart:OverviewZoomUnit := 24
			oChart:OverviewHeight := 58
			oChart:OverviewZoomCaption := "Y<br>e<br>a<br>r|½Y|¼Y|M<br>o<br>n<br>t<br>h|T|W<br>e<br>e<br>w|<img>pic1:28<img>|H<br>o<br>u<br>r|M<br>i<br>n|S<br>e<br>c"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/16/2001","01/25/2001")
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 4"),"Task","02/16/2001","02/25/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1131
Can I use icons or images in the text in the overview zoom buttons (Sec., Min., Hour, Month...)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:OverviewVisible := 2/*exOverviewShowAllVisible*/
			oChart:LevelCount := 2
			oChart:AllowOverviewZoom := 1/*exAlwaysZoom*/
			oChart:OverviewZoomUnit := 24
			oChart:OverviewZoomCaption := "Y|½Y|¼Y|<img>2<img>|T|W|<img>1<img>|H|M|S"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/16/2001","01/25/2001")
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 4"),"Task","02/16/2001","02/25/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1130
How do I change (for localisation) the text in the buttons like (Sec., Min., Hour, Month...)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:OverviewVisible := 2/*exOverviewShowAllVisible*/
			oChart:LevelCount := 2
			oChart:AllowOverviewZoom := 1/*exAlwaysZoom*/
			oChart:OverviewZoomUnit := 24
			oChart:OverviewZoomCaption := "Y|½Y|¼Y|Mo|T|W|D|H|Mi|S"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/16/2001","01/25/2001")
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","01/02/2001","01/04/2001")
			oItems:AddBar(oItems:AddItem("Item 4"),"Task","02/16/2001","02/25/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1129
How I can change the Months and Weekdays

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oLevel,oLevel1

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:FirstVisibleDate := "02/01/2010"
			oChart:LevelCount := 2
			oChart:UnitWidth := 10
			oChart:MonthNames := "1 2 3 4 5 6 7 8 9 10 11 12"
			oChart:WeekDays := "A B C D E F G"
			oLevel := oChart:Level(0)
				oLevel:Label := "<%mmmm%>"
				oLevel:Unit := 16/*exMonth*/
			oLevel1 := oChart:Level(1)
				oLevel1:Label := "<font ;6><%ddd%>"
				oLevel1:Unit := 4096/*exDay*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1128
How do i get the current window time frame (the start and end) of the gantt chart
PROCEDURE OnDateChange(oG2antt)
	LOCAL oChart
	oChart := oG2antt:Chart()
		DevOut( "Start" )
		DevOut( Transform(oChart:FirstVisibleDate(),"") )
		DevOut( "" )
		DevOut( "End" )
		DevOut( Transform(oChart:DateFromPoint(oChart:PaneWidth(.T.),0),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:DateChange := {|| OnDateChange(oG2antt)} /*Occurs when the first visible date is changed.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,1)
			oChart:LevelCount := 2
			oChart:ScrollTo("01/01/2010",0)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1127
When I use this Chart.get_DateFromPoint(exg2antt1.Width, 0) I get date as 0, 30/12/1899, or 12:00:00 AM. What that means
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	DevOut( Transform(oG2antt:Chart:DateFromPoint(-1,-1),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1126
How do I enable grabing bars to other items/rows (and only enable them to be dropped on certain rows)
PROCEDURE OnBarParentChange(oG2antt,Item,Key,NewItem,Cancel)
	DevOut( oG2antt:Items:CellCaption(NewItem,0) )
	Cancel := oG2antt:Items:ItemData(NewItem)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BarParentChange := {|Item,Key,NewItem,Cancel| OnBarParentChange(oG2antt,Item,Key,NewItem,Cancel)} /*Occurs just before moving a bar from current item to another item.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:AllowLinkBars := .F.
			oChart:Bars:Item("Task"):OverlaidType := 257/*exOverlaidBarsTransparent+exOverlaidBarsOffset*/
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item 1")
			oItems:SetProperty("EnableItem",h,.F.)
			oItems:SetProperty("ItemData",h,-1)
			h := oItems:AddItem("Item 2")
			oItems:SetProperty("ItemData",h,0)
			oItems:AddBar(h,"Task","01/05/2001","01/07/2001","B")
			oItems:SetProperty("ItemBar",h,"B",28/*exBarCanMoveToAnother*/,.T.)
			oItems:SetProperty("ItemData",oItems:AddItem("Item 3"),0)
			h := oItems:AddItem("Item 4")
			oItems:SetProperty("EnableItem",h,.F.)
			oItems:SetProperty("ItemData",h,-1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1125
How can I find out if a date time is a non-working part
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL d,h
	h := oG2antt:ItemFromPoint(-1,-1,c,hit)
	d := oG2antt:Chart:DateFromPoint(-1,-1)
	DevOut( Transform(d,"") )
	DevOut( Transform(oG2antt:Chart:IsNonworkingDate(d,h),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("NonWorking")
		oChart := oG2antt:Chart()
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:FirstVisibleDate := "01/24/2008"
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h := oItems:AddItem("Default")
			h := oItems:AddItem("January")
			oItems:SetProperty("ItemNonworkingUnits",h,.F.,"month(value) = 1")
			h := oItems:AddItem("February, Saturday, Sunday")
			oItems:SetProperty("ItemNonworkingUnits",h,.F.,"month(value) = 2 or (weekday(value) = 0 or weekday(value) = 6)")
			h := oItems:AddItem("Sunday")
			oItems:SetProperty("ItemNonworkingUnits",h,.F.,"weekday(value) = 0")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1124
I am using the ItemBar property exBarCanMoveToAnother, How do I stop it from being dropped on certain chart rows
PROCEDURE OnBarParentChange(oG2antt,Item,Key,NewItem,Cancel)
	DevOut( oG2antt:Items:CellCaption(NewItem,0) )
	Cancel := oG2antt:Items:ItemData(NewItem)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BarParentChange := {|Item,Key,NewItem,Cancel| OnBarParentChange(oG2antt,Item,Key,NewItem,Cancel)} /*Occurs just before moving a bar from current item to another item.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:AllowLinkBars := .F.
			oChart:Bars:Item("Task"):OverlaidType := 257/*exOverlaidBarsTransparent+exOverlaidBarsOffset*/
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item 1")
			oItems:SetProperty("EnableItem",h,.F.)
			oItems:SetProperty("ItemData",h,-1)
			h := oItems:AddItem("Item 2")
			oItems:SetProperty("ItemData",h,0)
			oItems:AddBar(h,"Task","01/05/2001","01/07/2001","B")
			oItems:SetProperty("ItemBar",h,"B",28/*exBarCanMoveToAnother*/,.T.)
			oItems:SetProperty("ItemData",oItems:AddItem("Item 3"),0)
			oItems:SetProperty("ItemData",oItems:AddItem("Item 4"),0)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1123
What is the event I should use to capture the click event on the task item on left hand side
PROCEDURE OnClick(oG2antt)
	LOCAL h
	h := oG2antt:ItemFromPoint(-1,-1,c,hit)
	DevOut( oG2antt:Items:CellCaption(h,c) )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Click := {|| OnClick(oG2antt)} /*Occurs when the user presses and then releases the left mouse button over the tree control.*/

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Columns():Add("Items")
		oItems := oG2antt:Items()
			h := oItems:AddItem("R1")
			oItems:InsertItem(h,,"Cell 1.1")
			oItems:InsertItem(h,,"Cell 1.2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"Cell 2.1")
			oItems:InsertItem(h,,"Cell 2.2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1122
Can I add a hyperlink assigned to a bar

PROCEDURE OnAnchorClick(oG2antt,AnchorID,Options)
	DevOut( Transform(AnchorID,"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AnchorClick := {|AnchorID,Options| OnAnchorClick(oG2antt,AnchorID,Options)} /*Occurs when an anchor element is clicked.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K")
			oItems:SetProperty("ItemBar",h,"K",3/*exBarCaption*/,"default")
			oItems:SetProperty("ItemBar",h,"K",4/*exBarHAlignCaption*/,18)
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K")
			oItems:SetProperty("ItemBar",h,"K",3/*exBarCaption*/,"<a1><b>A 1</b></a>")
			oItems:SetProperty("ItemBar",h,"K",4/*exBarHAlignCaption*/,18)
			h := oItems:AddItem("Task 3")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K")
			oItems:SetProperty("ItemBar",h,"K",3/*exBarCaption*/,"<a2><b>A 2</b></a>")
			oItems:SetProperty("ItemBar",h,"K",4/*exBarHAlignCaption*/,18)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1121
Can I change the background color only for the text (caption) in a bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K")
			oItems:SetProperty("ItemBar",h,"K",3/*exBarCaption*/,"default")
			oItems:SetProperty("ItemBar",h,"K",4/*exBarHAlignCaption*/,18)
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K")
			oItems:SetProperty("ItemBar",h,"K",3/*exBarCaption*/,"using <bgcolor=FF0000>bgcolor</bgcolor> HTML attribute ")
			oItems:SetProperty("ItemBar",h,"K",4/*exBarHAlignCaption*/,18)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1120
Can I change the font to display the text (caption) in a bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K")
			oItems:SetProperty("ItemBar",h,"K",3/*exBarCaption*/,"default")
			oItems:SetProperty("ItemBar",h,"K",4/*exBarHAlignCaption*/,18)
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K")
			oItems:SetProperty("ItemBar",h,"K",3/*exBarCaption*/,"<font Segoe UI;8 >using font HTML attribute </fgcolor>")
			oItems:SetProperty("ItemBar",h,"K",4/*exBarHAlignCaption*/,18)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1119
How do i change the forecolor of text (caption) in a bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K")
			oItems:SetProperty("ItemBar",h,"K",3/*exBarCaption*/,"default")
			oItems:SetProperty("ItemBar",h,"K",4/*exBarHAlignCaption*/,18)
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K")
			oItems:SetProperty("ItemBar",h,"K",3/*exBarCaption*/,"<fgcolor=FF0000>using fgcolor HTML attribute </fgcolor>")
			oItems:SetProperty("ItemBar",h,"K",4/*exBarHAlignCaption*/,18)
			h := oItems:AddItem("Task 3")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K")
			oItems:SetProperty("ItemBar",h,"K",3/*exBarCaption*/,"using exBarForeColor")
			oItems:SetProperty("ItemBar",h,"K",4/*exBarHAlignCaption*/,18)
			oItems:SetProperty("ItemBar",h,"K",8/*exBarForeColor*/,65280)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1118
I have noticed that when scrolling horizontally the chart a tooltip shown. is it possible to actually do the scrolling without showing the tooltip
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "06/20/2005"
			oChart:AllowLinkBars := .T.
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:ToolTip := ""
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/25/2005","A")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/28/2005","07/02/2005","B")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1117
How can I add a bar to be treated as a nonworking part like a "holidays" bar

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:AllowNonworkingBars := .T.
			oChart:Bars():Add("Task:Split"):Shortcut := "Task"
		oG2antt:Columns():Add("Tasks")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:SetProperty("ItemNonworkingUnits",h,.F.,"weekday(value) in (0,6)")
			oItems:AddBar(h,"","01/02/2001","01/05/2001","A","holyday")
			oItems:SetProperty("ItemBar",h,"A",38/*exBarTreatAsNonworking*/,.T.)
			oItems:AddBar(h,"Task","01/05/2001","01/12/2001","Z")
			oItems:SetProperty("ItemBar",h,"Z",20/*exBarKeepWorkingCount*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1116
Is it possible to add bars that act like a non-working fixed part or the item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:AllowNonworkingBars := .T.
		oG2antt:Columns():Add("Tasks")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:SetProperty("ItemNonworkingUnits",h,.F.,"weekday(value) in (0,6)")
			oItems:AddBar(h,"","01/03/2001","01/06/2001","h","holyday")
			oItems:SetProperty("ItemBar",h,"h",38/*exBarTreatAsNonworking*/,.T.)
			oItems:SetProperty("ItemBar",h,"h",29/*exBarSelectable*/,.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1115
Is it possible to add bars that act like a non-working part or the item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:AllowNonworkingBars := .T.
		oG2antt:Columns():Add("Tasks")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:SetProperty("ItemNonworkingUnits",h,.F.,"weekday(value) in (0,6)")
			oItems:AddBar(h,"","01/03/2001","01/06/2001","h","holyday")
			oItems:SetProperty("ItemBar",h,"h",38/*exBarTreatAsNonworking*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1114
How can I change the both dates for the bar at once
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:FirstVisibleDate := "06/21/2005"
			oChart:ShowEmptyBars := 1
		oItems := oG2antt:Items()
			h := oItems:AddItem("Test")
			oItems:AddBar(h,"Task","06/22/2005","06/26/2005","")
			oItems:AddBar(h,"Task","06/27/2005","06/29/2005")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1113
How can I get the selected bars in the chart

PROCEDURE OnChartSelectionChanged(oG2antt)
	DevOut( Transform(oG2antt:Items:SelectedObjects(1/*exSelectBarsOnly*/),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:ChartSelectionChanged := {|| OnChartSelectionChanged(oG2antt)} /*Occurs when the user selects objects in the chart area.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "06/20/2005"
			oChart:AllowLinkBars := .T.
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/25/2005","A")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/28/2005","07/02/2005","B")
			oItems:SetProperty("ItemBar",oItems:FirstVisibleItem(),oItems:FirstItemBar(oItems:FirstVisibleItem()),257/*exBarSelected*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1112
How can I list the actions that can be performed by undo operations
PROCEDURE OnChartEndChanging(oG2antt,Operation)
	DevOut( oG2antt:Chart:UndoListAction() )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:ChartEndChanging := {|Operation| OnChartEndChanging(oG2antt,Operation)} /*Occurs after the chart has been changed.*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():AllowLinkBars := .F.
		oG2antt:Chart():Bars:Item("Task"):OverlaidType := 257/*exOverlaidBarsTransparent+exOverlaidBarsOffset*/
		oG2antt:Chart():AllowUndoRedo := .T.
		oG2antt:Chart():SetProperty("PaneWidth",.F.,32)
		oG2antt:Chart():Bars():Add("Task:Split"):Shortcut := "Task"
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/04/2001","A")
			h := oItems:AddItem("Item 2")
			oItems:AddBar(h,"Task","01/05/2001","01/09/2001","B")
			oItems:SetProperty("ItemBar",h,"B",28/*exBarCanMoveToAnother*/,.T.)
			oItems:SetProperty("ItemBar",h,"B",20/*exBarKeepWorkingCount*/,.T.)
			oItems:SetProperty("ItemNonworkingUnits",oItems:AddItem("Item 3"),.F.,"weekday(value)=0")
			oItems:SetProperty("ItemNonworkingUnits",oItems:AddItem("Item 4"),.F.,"weekday(value) in (3,5)")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1111
How can I change the predefined labels being displayed in the chart's header so it shows the data in short format with no literals

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:AllowOverviewZoom := 1/*exAlwaysZoom*/
			oChart:OverviewVisible := 2/*exOverviewShowAllVisible*/
			oChart:LevelCount := 3
			oChart:SetProperty("Label",0/*exYear*/,"<%yy%><|><%yyyy%>")
			oChart:SetProperty("Label",1/*exHalfYear*/,"")
			oChart:SetProperty("Label",2/*exQuarterYear*/,"")
			oChart:SetProperty("Label",16/*exMonth*/,"<|><%m%><|><%m%>/<%yy%><|><%m%>/<%yyyy%>")
			oChart:SetProperty("Label",17/*exThirdMonth*/,"")
			oChart:SetProperty("Label",256/*exWeek*/,"<|><%ww%><|><%m%>/<%d%>/<%yy%><r><%ww%><|><%m%>/<%d%>/<%yyyy%><r><%ww%><||><||>256")
			oChart:SetProperty("Label",4096/*exDay*/,"<|><%d%><|><%m%>/<%d%>/<%yy%><|><%m%>/<%d%>/<%yyyy%><||><||>4096")
			oChart:SetProperty("Label",65536/*exHour*/,"<|><%hh%><|><%m%>/<%d%>/<%yy%> <%h%> <%AM/PM%><|><%m%>/<%d%>/<%yyyy%> <%h%> <%AM/PM%><||><||>65536")
			oChart:SetProperty("Label",1048576/*exMinute*/,"<|><%nn%><|><%h%>:<%nn% <%AM/PM%>><|><%m%>/<%d%>/<%yy%> <%h%>:<%nn%> <%AM/PM%><|><%m%>/<%d%>/<%yyyy%> <%h%>:<%nn%> <%AM/PM%>")
			oChart:SetProperty("Label",16777216/*exSecond*/,"<|><%ss%><|><%nn%>:<%ss%><|><%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%m%>/<%d%>/<%yy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%><|><%m%>/<%d%>/<%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>")
			oChart:SetProperty("LabelToolTip",0/*exYear*/,"<%yyyy%>")
			oChart:SetProperty("LabelToolTip",1/*exHalfYear*/,"")
			oChart:SetProperty("LabelToolTip",2/*exQuarterYear*/,"")
			oChart:SetProperty("LabelToolTip",16/*exMonth*/,"<%m%>/<%yyyy%>")
			oChart:SetProperty("LabelToolTip",17/*exThirdMonth*/,"")
			oChart:SetProperty("LabelToolTip",256/*exWeek*/,"<%m%>/<%d%>/<%yyyy%> <%ww%>")
			oChart:SetProperty("LabelToolTip",4096/*exDay*/,"<%m%>/<%d%>/<%yyyy%>")
			oChart:SetProperty("LabelToolTip",65536/*exHour*/,"<%m%>/<%d%>/<%yyyy%> <%h%> <%AM/PM%>")
			oChart:SetProperty("LabelToolTip",1048576/*exMinute*/,"<%m%>/<%d%>/<%yyyy%> <%h%>:<%nn%> <%AM/PM%>")
			oChart:SetProperty("LabelToolTip",16777216/*exSecond*/,"<%m%>/<%d%>/<%yyyy%> <%h%>:<%nn%>:<%ss%> <%AM/PM%>")
			oChart:UnitScale := 4096/*exDay*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1110
The histogram does not show (correctly) the bars, even if I changed the Bar.HistogramPattern and Bar.HistogramColor properties. What can be wrong

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "12/27/2000"
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 32
			oBar := oChart:Bars:Item("Task")
				oBar:HistogramPattern := 6/*exPatternBDiagonal*/
				oBar:SetProperty("HistogramColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oChart:ResizeUnitScale := 65536/*exHour*/
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2001 08:00:00","01/02/2001 12:00:00")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/01/2001 08:00:00","01/05/2001 12:00:00")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1109
How can I change the default key for the newly added link from "Link1" to my identifier
PROCEDURE OnAddLink(oG2antt,LinkKey)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddLink("newIDlink",oItems:Link(LinkKey,0/*exLinkStartItem*/),oItems:Link(LinkKey,1/*exLinkStartBar*/),oItems:Link(LinkKey,2/*exLinkEndItem*/),oItems:Link(LinkKey,3/*exLinkEndBar*/))
		oItems:RemoveLink(LinkKey)
RETURN

PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	DevOut( Transform(oG2antt:Chart:LinkFromPoint(-1,-1),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddLink := {|LinkKey| OnAddLink(oG2antt,LinkKey)} /*Occurs when the user links two bars using the mouse.*/
		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "06/20/2005"
			oChart:AllowLinkBars := .T.
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/25/2005","")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/28/2005","07/02/2005","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1108
How can I change the default key for the newly added link from "Link1" to my identifier
PROCEDURE OnAllowLink(oG2antt,StartItem,StartBarKey,EndItem,EndBarKey,LinkKey,Cancel)
	LinkKey := "newIDlink"
RETURN

PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	DevOut( Transform(oG2antt:Chart:LinkFromPoint(-1,-1),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AllowLink := {|StartItem,StartBarKey,EndItem,EndBarKey,LinkKey,Cancel| OnAllowLink(oG2antt,StartItem,StartBarKey,EndItem,EndBarKey,LinkKey,Cancel)} /*Notifies at runtime when a link between two bars is possible.*/
		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "06/20/2005"
			oChart:AllowLinkBars := .T.
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,48)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","06/21/2005","06/25/2005","")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","06/28/2005","07/02/2005","")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1107
We want to have a Task ID column as the first column that shows the row number. How can we do that
PROCEDURE OnFormatColumn(oG2antt,Item,ColIndex,Value)
	Value := oG2antt:Items:ItemPosition(Item)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:FormatColumn := {|Item,ColIndex,Value| OnFormatColumn(oG2antt,Item,ColIndex,Value)} /*Fired when a cell requires to format its caption.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:Width := 24
			oColumn:AllowSizing := .F.
			oColumn:Position := 0
			oColumn:FireFormatColumn := .T.
		oItems := oG2antt:Items()
			oItems:AddItem("Task A")
			oItems:AddItem("Task B")
			oItems:AddItem("Task C")
			oItems:AddItem("Task D")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1106
How can I get the caption of focused item
PROCEDURE OnSelectionChanged(oG2antt)
	LOCAL oItems
	oItems := oG2antt:Items()
		DevOut( "Handle" )
		DevOut( Transform(oItems:FocusItem(),"") )
		DevOut( "Caption" )
		DevOut( oItems:CellCaption(oItems:FocusItem(),0) )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:SelectionChanged := {|| OnSelectionChanged(oG2antt)} /*Fired after a new item has been selected.*/

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Columns():Add("Items")
		oItems := oG2antt:Items()
			h := oItems:AddItem("R1")
			oItems:InsertItem(h,,"Cell 1.1")
			oItems:InsertItem(h,,"Cell 1.2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"Cell 2.1")
			oItems:InsertItem(h,,"Cell 2.2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1105
How can I get the caption of selected item
PROCEDURE OnSelectionChanged(oG2antt)
	LOCAL oItems
	oItems := oG2antt:Items()
		DevOut( "Handle" )
		DevOut( Transform(oItems:SelectedItem(0),"") )
		DevOut( "Caption" )
		DevOut( oItems:CellCaption(oItems:SelectedItem(0),0) )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:SelectionChanged := {|| OnSelectionChanged(oG2antt)} /*Fired after a new item has been selected.*/

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Columns():Add("Items")
		oItems := oG2antt:Items()
			h := oItems:AddItem("R1")
			oItems:InsertItem(h,,"Cell 1.1")
			oItems:InsertItem(h,,"Cell 1.2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"Cell 2.1")
			oItems:InsertItem(h,,"Cell 2.2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1104
How can I get the link from the point

PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	DevOut( Transform(oG2antt:Chart:LinkFromPoint(-1,-1),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/29/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:SetProperty("Link","L1",12/*exLinkText*/,"L1")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","L2",12/*exLinkText*/,"L2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1103
How can I get the bar from the point

PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	DevOut( Transform(oG2antt:Chart:BarFromPoint(-1,-1),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h1,h2,h3

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/29/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/04/2001","01/06/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1102
How can I get the level from the cursor

PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	DevOut( Transform(oG2antt:Chart:LevelFromPoint(-1,-1),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "06/25/2010"
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 4

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1101
How can I get the date from the cursor

PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	DevOut( Transform(oG2antt:Chart:DateFromPoint(-1,-1),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN